import request from '@/config/axios'

export interface CorpQueueConfigVO {
  id: number
  queueSetupType: number
  queueConfigContent: number
  maxVehicleCapacity: number
  enableStatus: boolean
}

// 查询企业排号队列配置列表
export const getCorpQueueConfigPage = async (params: CorpQueueConfigPageReqVO) => {
  return await request.get({ url: `/queue/corp-queue-config/page`, params })
}

// 查询企业排号队列配置详情
export const getCorpQueueConfig = async (id: number) => {
  return await request.get({ url: `/queue/corp-queue-config/get?id=` + id })
}

// 新增企业排号队列配置
export const createCorpQueueConfig = async (data: CorpQueueConfigVO) => {
  return await request.post({ url: `/queue/corp-queue-config/create`, data })
}

// 修改企业排号队列配置
export const updateCorpQueueConfig = async (data: CorpQueueConfigVO) => {
  return await request.put({ url: `/queue/corp-queue-config/update`, data })
}

// 删除企业排号队列配置
export const deleteCorpQueueConfig = async (id: number) => {
  return await request.delete({ url: `/queue/corp-queue-config/delete?id=` + id })
}

// 导出企业排号队列配置 Excel
export const exportCorpQueueConfig = async (params) => {
  return await request.download({ url: `/queue/corp-queue-config/export-excel`, params })
}
